package com.event.management.backend.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 问卷题目数据传输对象
 */
@Data
@ApiModel(value = "问卷题目", description = "问卷题目信息")
public class QuestionnaireQuestionDTO {
    
    @ApiModelProperty(value = "题目ID")
    private Long id;
    
    @ApiModelProperty(value = "题目内容", required = true)
    @NotBlank(message = "题目内容不能为空")
    @Size(max = 255, message = "题目内容长度不能超过255个字符")
    private String questionText;
    
    @ApiModelProperty(value = "题型", required = true, example = "single", 
            allowableValues = "single,multiple,text")
    @NotBlank(message = "题型不能为空")
    @Pattern(regexp = "^(single|multiple|text)$", message = "题型只能是single、multiple或text")
    private String questionType;
    
    @ApiModelProperty(value = "选项列表", notes = "对于单选和多选题，需要提供选项")
    private List<String> options;
    
    @ApiModelProperty(value = "是否必填", example = "true")
    private Boolean isRequired;
    
    @ApiModelProperty(value = "排序字段", example = "1")
    private Integer sortOrder;
} 